Computer programming languages may allow a programmer to declare dynamic data structures that may grow, during the execution of a program, when the data structures need to store additional data. Each time that a size of a dynamic data structure needs to be expanded to store additional data, a new area in memory needs to be allocated for the expanded data structure and all of the data previously stored by the data structure needs to be copied into the newly allocated area in memory. As a result, time and computing resources are wasted by the requirements for the individual iterations of growing a data structure. For example, O(n2) time may be required to grow an array to store “n” number of elements when one element is added to the array at a time.
To avoid growing a data structure each time that additional element(s) are added to the data structure, a programmer may initially pre-allocate memory for the data structure to store additional data that may be added to the data structure at future points in time. However, users may not know to or not know how to properly pre-allocate memory for a data structure. Other users may find requirements of adding code to pre-allocate memory for a data structure burdensome. Also, programmers often have no way of predicting/determining, during coding of a program, how much data will be stored in a data structure during the execution of the program. Accordingly, these programmers do not know how much memory to pre-allocate for the data structure. For example, pre-allocation for one data structure may not be used to provide for enough memory to avoid growing the structure when two or more data structures are concatenated during execution of a program.